<extend name="Public/base" />

<block name="body"> <script type="text/javascript"
                            src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>

    <div class="main-title">
        <h2>{:isset($info['id'])?'编辑':'新增'}滚屏广告</h2>
    </div>
    <div class="tab-wrap">
        <form action="__SELF__" method="post" class="form-horizontal">
            <input type="hidden" name="id" value="{$info.id}">
            <div class="form-item">
                <label class="item-label">滚屏内容<span class="check-tips">（不能为空）</span></label>
                <div class="controls">
                    <label class="textarea input-large">
                        <textarea name="content">{$info.content}</textarea>
                    </label>
                </div>
            </div>

            <div class="form-item">
                <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">保存</button>
                <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
            </div>
        </form>
    </div>
</block>

<block name="script">
    <link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
    <php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
    <link rel="stylesheet" type="text/css" href="__STATIC__/bootstrap/css/bootstrap-select.css" />
    <link rel="stylesheet" type="text/css" href="__STATIC__/bootstrap/css/bootstrap-typeahead.css" />
    <script type="text/javascript" src="__STATIC__/bootstrap/js/bootstrap.js"></script>
    <script type="text/javascript" src="__STATIC__/bootstrap/js/bootstrap-select.js"></script>
    <script type="text/javascript" src="__STATIC__/bootstrap/js/bootstrap-typeahead.js"></script>
    <script type="text/javascript" charset="utf-8">
        highlight_subnav('{:U('Ad/lunbo')}');
        $(function(){
            //日期时间选择器
            $("#begin_time").datetimepicker({
                format: "yyyy-mm-dd",
                autoclose: true,
                minView: "month",
                maxView: "decade",
                todayBtn: true,
                pickerPosition: "bottom-left"
            }).on("click",function(ev){
                $("#begin_time").datetimepicker("setEndDate", $("#end_time").val());
            });

            $("#end_time").datetimepicker({
                format: "yyyy-mm-dd",
                autoclose: true,
                minView: "month",
                maxView: "decade",
                todayBtn: true,
                pickerPosition: "bottom-left"
            }).on("click", function (ev) {
                $("#end_time").datetimepicker("setStartDate", $("#begin_time").val());
            });
        });
    </script>
</block>
